//
//  WFButtonCell.m
//  WisdomFarm
//
//  Created by sky on 2017/11/26.
//  Copyright © 2017年 sky. All rights reserved.
//

#import "WFButtonCell.h"

@implementation WFButtonCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setup];
    }
    return self;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setup];
    }
    return self;
}

- (void)setup {
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.button setImage:[UIImage imageNamed:@"home_edit_icon_plus"] forState:UIControlStateNormal];
    [self.button setTitle:@"添加农作物" forState:UIControlStateNormal];
    self.button.titleLabel.font = SCFont(14);
    [self.button setTitleColor:[UIColor textLightColor] forState:UIControlStateNormal];
    [self.contentView addSubview:self.button];
    [self.button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.insets(UIEdgeInsetsZero);
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
